package day9.problem1;

//添加逗号
//https://www.nowcoder.com/practice/f51c317e745649c0900996fd3f683aed?tpId=290&tqId=39934&ru=/exam/oj

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int n = s.length();
        int k = n % 3;
        StringBuffer ret = new StringBuffer();
        for(int i = 0; i<k; i++) {
            ret.append(s.charAt(i));
        }
        if(k != 0 && n > 3) ret.append(",");
        int cnt = 0;
        for(int i = k; i<n; i++) {
            ret.append(s.charAt(i));
            cnt++;
            if(cnt == 3) {
                if(i != n-1) ret.append(',');
                cnt = 0;
            }
        }
        System.out.println(ret);
    }
}